<?php defined('InNcPHP') or exit('Access Invalid!');?>

<script type="text/javascript" src="<?php echo RESOURCE_URL;?>/common/jquery-ui/jquery.ui.js"></script>
<script type="text/javascript" src="<?php echo RESOURCE_URL;?>/common/jquery-ui/i18n/zh-CN.js" charset="utf-8"></script>
<link rel="stylesheet" type="text/css" href="<?php echo RESOURCE_URL;?>/common/jquery-ui/themes/ui-lightness/jquery.ui.css"  />

<div class="page">
    <div class="fixed-bar">
        <div class="item-title">
            <h3><?php echo $lang['nc_manage'];?></h3>
            <?php echo $output['top_link'];?>
        </div>
    </div>
    <div class="fixed-empty"></div>
    <!--  搜索表单  -->
    <form method="get" name="formSearch" id="formSearch">
        <input type="hidden" value="member" name="act">
        <input type="hidden" value="index" name="op">
        <table class="tb-type1 noborder search">
            <tbody>
            <tr>
                <th><label for="search_nickname"> <?php echo $lang['member_index_member_nickname'];?></label></th>
                <td><input type="text" name="search_nickname" value="<?php echo $output['search']['search_nickname']; ?>" id="search_nickname" class="txt"></td>
                <th><label for="search_stime"><?php echo $lang['member_index_addtime'];?></label></th>
                <td><input type="text" name="search_stime" value="<?php echo $output['search']['search_stime']; ?>" id="search_stime" class="txt date"></td>
                <td><input type="text" name="search_etime" value="<?php echo $output['search']['search_etime']; ?>" id="search_etime" class="txt date"></td>
                <th></th>
                <td>
                    <a href="javascript:void(0);" onclick="$('#formSearch').submit();" class="btn-search"></a>
                </td>
                <?php if ($output['search']['search_nickname'] || $output['search']['search_stime'] || $output['search']['search_etime']): ?>
                <th></th>
                <td><a href="index.php?act=member&op=index" class="btns "><span><?php echo $lang['nc_cancel_search']?></span></a></td>
                <?php endif; ?>
            </tr>
            </tbody>
        </table>
    </form>
    <!--  显示列表  -->
    <table class="table tb-type2 nobdb">
        <thead>
        <tr class="thead">
            <!--<th><?php /*echo $lang['member_index']*/?></th>-->
            <th class="align-center"><?php echo $lang['member_index_member_nickname']?></th>
            <!--<th class="align-center"><?php /*echo $lang['member_index_member_sex']*/?></th>
            <th class="align-center"><?php /*echo $lang['member_index_member_province']*/?></th>
            <th class="align-center"><?php /*echo $lang['member_index_member_city']; */?></th>-->
            <th class="align-center"><?php echo $lang['member_index_addtime']?></th>
            <th class="align-center"><?php echo $lang['member_index_is_merchant'];?></th>
        </tr>
        <tbody>
        <?php if(!empty($output['member_list']) && is_array($output['member_list'])){ ?>
            <?php foreach($output['member_list'] as $k => $v){ ?>
                <tr class="hover member">
                   <!-- <td class="w48 picture">
                        <div class="size-44x44">
                            <span class="thumb size-44x44"><i></i><img style="width: 44px;height: 44px;" src="<?php /*echo $v['headimgurl']; */?>" /></span>
                        </div>
                    </td>-->
                    <td class="align-center"><?php echo $v['mobile']; ?></td>
                   <!-- <td class="align-center"><?php /*echo $output['member_sex'][$v['sex']]; */?></td>
                    <td class="align-center"><?php /*echo $v['province']; */?></td>
                    <td class="align-center"><?php /*echo $v['city']; */?></td>-->
                    <td class="align-center"><?php echo date('Y-m-d H:i:s',$v['addtime']); ?></td>
                    <td class="align-center"><?php echo $v['is_merchant'] ? $lang['nc_yes'] : $lang['nc_no']; ?></td>
                </tr>
            <?php } ?>
        <?php }else { ?>
            <tr class="no_data">
                <td colspan="11"><?php echo $lang['nc_no_record']?></td>
            </tr>
        <?php } ?>
        </tbody>
        <tfoot class="tfoot">
        <?php if(!empty($output['member_list']) && is_array($output['member_list'])){ ?>
            <tr>
                <td colspan="16">
                    <div class="pagination"> <?php echo $output['page'];?> </div>
                </td>
            </tr>
        <?php } ?>
        </tfoot>
    </table>
</div>
<script>
    //开始日期
    $('#search_stime').datepicker({
        dateFormat: 'yy-mm-dd',
        onClose: function(selectedDate) {
            $("#search_etime").datepicker("option", "minDate", selectedDate);
        }
    });
    //结束日期
    $('#search_etime').datepicker({
        dateFormat: 'yy-mm-dd',
        onClose: function(selectedDate) {
            $("#search_stime").datepicker("option", "maxDate", selectedDate);
        }
    });
</script>
